//template部分
<template>
	<div>
		<day-table @setTime='setTime' :hourHeight='64' :meetingListOrgin="meetingList" scrollHeight="height:calc(70vh)" @bookMeeting='bookMeeting($event)'>  </day-table>
		<div>
			{{ allTime.startTime }}--{{ allTime.endTime }}
		</div>
	</div>

</template>

<!-- //script部分 -->
<!-- 
	@setTime  时间传递
	hourHeight： 单元格高度*2
	meetingListOrgin： 已选择会议时间段
	scrollHeight  组件高度
	@bookMeeting :  点击选中区域事件
 -->
<script>
  import dayTable from "../../components/luoxiao-dayTable/dayTable.vue";
  export default {
    components: {
      dayTable,
	  
    },
	data() {
		return {
			allTime: {
				startTime: '00:00',
				endTime: '00:00',
			},
			meetingList: [{
			  isMe: false,
			  meetingName: "其他人的会议",
			  startTime: "2019-07-31 04:15:00",
			  endTime: "2012-07-31 05:30:02"
			},
			// {
			//   isMe: true,
			//   meetingName: "测试讨论bugdfdfsdfdsf会议",
			//   startTime: "2019-07-31 15:15:00",
			//   endTime: "2019-07-31 15:30:02"
			// }
		  ]
		}
	},
    methods: {
		setTime(type, time) {
			if(type == 'startTime') {
				this.$set(this.allTime, 'startTime', time)
				// this.allTime.startTime = time
			}else {
				this.$set(this.allTime, 'endTime', time)
				// this.allTime.endTime = time
			}
			// type == 'endTime' ? this.allTime.endTime = time : this.allTime.startTime = time
		},
        //点击创建日程操作，
        //e返回参数 数据结构为{
        // endTime: "2020-03-22 17:30:00"
        //startTime: "2020-03-22 16:30:00"}   
      bookMeeting(e) {
        let params  = e;
		this.allTime = e
        console.log(params)
      }
    }
  }
</script>